-- GENERATED SPELL FOR [Master Summoner Zarod] --


function spell0_30746(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(11831,pUnit)
pUnit:RegisterEvent('Sorts_30746', 8307, 1)
end

function spell1_30746(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(9672,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30746', 7000, 1)
end

function spell2_30746(pUnit, Event) --@Lich Slap,n/a--
pUnit:FullCastSpellOnTarget(28873,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_30746', 619, 1)
end

function Sorts_30746(pUnit, Event)
local choix_sorts_30746 = math.random(0, 2)
if choix_sorts_30746 == 0 then
pUnit:RegisterEvent('spell0_30746', 1, 1)
end
if choix_sorts_30746 == 1 then
pUnit:RegisterEvent('spell1_30746', 1, 1)
end
if choix_sorts_30746 == 2 then
pUnit:RegisterEvent('spell2_30746', 1, 1)
end
end

function mob30746_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_30746', math.random(1500, 3000), 1)
end

function mob30746_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30746_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob30746_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(30746, 1, 'mob30746_Action')
RegisterUnitEvent(30746, 2, 'mob30746_Leave')
RegisterUnitEvent(30746, 3, 'mob30746_Kill')
RegisterUnitEvent(30746, 4, 'mob30746_Die')
